.responsive-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.layout-header {
  position: fixed;
  z-index: 1000;
  width: 100%;
  padding: 0 24px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  height: 64px;
  line-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.layout-sider {
  position: fixed;
  left: 0;
  height: 100vh;
  overflow: auto;
  background: #fff;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s;
}

.layout-content {
  margin: 64px 0 0 0;
  padding: 24px;
  background: #f0f2f5;
  min-height: calc(100vh - 64px);
  transition: all 0.2s;
}

.layout-footer {
  text-align: center;
  background: #fff;
  padding: 16px 50px;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);
}

/* 超大屏幕 (xxl) */
@media (min-width: 1600px) {
  .layout-content {
    padding: 32px;
  }

  .layout-header {
    padding: 0 32px;
  }
}

/* 大屏幕 (xl) */
@media (min-width: 1200px) and (max-width: 1599px) {
  .layout-content {
    padding: 24px;
  }

  .layout-header {
    padding: 0 24px;
  }
}

/* 中等屏幕 (lg) */
@media (min-width: 992px) and (max-width: 1199px) {
  .layout-content {
    padding: 20px;
  }

  .layout-header {
    padding: 0 20px;
  }
}

/* 小屏幕 (md) */
@media (min-width: 768px) and (max-width: 991px) {
  .layout-content {
    padding: 16px;
    margin-left: 0;
  }

  .layout-header {
    padding: 0 16px;
  }

  .layout-sider {
    transform: translateX(-100%);
  }

  .layout-sider.collapsed {
    transform: translateX(0);
  }
}

/* 平板设备 (sm) */
@media (min-width: 576px) and (max-width: 767px) {
  .layout-content {
    padding: 12px;
    margin-left: 0;
  }

  .layout-header {
    padding: 0 12px;
    height: 56px;
    line-height: 56px;
  }

  .layout-footer {
    padding: 12px;
  }

  .layout-sider {
    transform: translateX(-100%);
  }

  .layout-sider.collapsed {
    transform: translateX(0);
  }
}

/* 手机设备 (xs) */
@media (max-width: 575px) {
  .layout-content {
    padding: 8px;
    margin-left: 0;
  }

  .layout-header {
    padding: 0 8px;
    height: 48px;
    line-height: 48px;
  }

  .layout-footer {
    padding: 8px;
  }

  .layout-sider {
    transform: translateX(-100%);
    width: 100% !important;
    max-width: 100% !important;
  }

  .layout-sider.collapsed {
    transform: translateX(0);
  }
}

/* 触摸设备优化 */
@media (hover: none) {
  .layout-sider {
    -webkit-overflow-scrolling: touch;
  }

  .layout-content {
    -webkit-overflow-scrolling: touch;
  }

  /* 增加触摸目标大小 */
  .layout-header button,
  .layout-sider button {
    min-height: 44px;
    min-width: 44px;
    padding: 12px;
  }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {

  .layout-header,
  .layout-sider,
  .layout-footer {
    background: #141414;
    color: rgba(255, 255, 255, 0.85);
  }

  .layout-content {
    background: #000;
  }

  .layout-header,
  .layout-footer {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  }

  .layout-sider {
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.45);
  }
}

/* 横屏优化 */
@media (orientation: landscape) and (max-height: 500px) {
  .layout-header {
    height: 48px;
    line-height: 48px;
  }

  .layout-content {
    margin-top: 48px;
    min-height: calc(100vh - 48px);
  }
}

/* 打印优化 */
@media print {

  .layout-header,
  .layout-sider,
  .layout-footer {
    display: none;
  }

  .layout-content {
    margin: 0;
    padding: 0;
    background: #fff;
  }
}